// File Name: key_ctrl.h
// Author: kukukukuku~
// Date: 2024-12-24

#ifndef __KEY_CTRL_H
#define __KEY_CTRL_H

#include "apm32f00x.h"
#include "apm32f00x_gpio.h"
#include "./Key/inc/key_macros.h"

//Key GPIO对象
typedef struct KEY_GPIO_OBJECT_T
{
    GPIO_T *port;
    uint8_t pin;
}KEY_GPIO_OBJECT_T, *pKEY_GPIO_OBJECT_T;

void key_delay_ms(uint16_t ms);

uint8_t key_polarity_get(KEY_GPIO_OBJECT_T * const gpio);

void key_tmr1_enable(void);
void key_tmr1_disable(void);

#endif //__KEY_CTRL_H
